﻿using System;

namespace RegisterResolveReleasePattern
{
    public interface IWriter
    {
        void Write(string input);
    }

    public class Writer : IWriter
    {
        private readonly IParser _parser;

        public Writer(IParser parser)
        {
            _parser = parser;
        }

        public void Write(string input)
        {
            var log = _parser.Parse(input);
            Console.WriteLine(log);
        }
    }
}